package com.qd.panda.evaluate;

import com.cdqidi.dto.ApiResult;
import com.cdqidi.dto.ApiResultWrapper;
import com.qd.panda.service.score.CarParkScoreEvaluationLabelService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * WEB_停车场评分
 *
 * @author sjk
 */
@RequiredArgsConstructor
@Validated
@RestController
@RequestMapping("/sys/carParkScore")
@Slf4j
public class CarParkScoreController {

    private final CarParkScoreEvaluationLabelService carParkScoreEvaluationLabelService;

    /**
     * 清除评价标签缓存
     */
    @GetMapping(value = "/clearLabelCache")
    public ApiResultWrapper<Object> clearLabelCache() {
        carParkScoreEvaluationLabelService.clearLabelCache();
        return ApiResult.success("清理缓存成功");
    }
}